<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/8
 * Time: 17:16
 */
//$oldName = $_FILES['file']['name'];
//
//$arr = explode('.',$oldName);
//
//$newName = md5($oldName.time().'.'.$arr[count($arr)-1]);

$newFile = '../public/img/'.$_FILES['file']['name'];

move_uploaded_file($_FILES['file']['tmp_name'],$newFile);

header('location:userInfo.php?temp='.$_FILES['file']['name']);